<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
    <!-- Google Chrome Frame也可以让IE用上Chrome的引擎: -->
    <meta name="renderer" content="webkit">
    <!--国产浏览器高速模式-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="快乐两小时" />
    <!-- 作者 -->
    <meta name="revised" content="快乐两小时.v1, 2021/04/03" />
    <!-- 定义页面的最新版本 -->
    <meta name="description" content="网站简介" />
    <!-- 网站简介 -->
    <meta name="keywords" content="搜索关键字，以半角英文逗号隔开" />
    <title>快乐两小时</title>
    <!-- 公共样式 开始 -->
    <link rel="shortcut icon" href="__ADMIN__images/favicon.ico" />
    <link rel="bookmark" href="__ADMIN__images/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="__ADMIN__css/base.css">
    <link rel="stylesheet" type="text/css" href="__ADMIN__css/iconfont.css">
    <script type="text/javascript" src="__ADMIN__framework/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" type="text/css" href="__ADMIN__layui/css/layui.css">
    <!--[if lt IE 9]>
	      	<script src="framework/html5shiv.min.js"></script>
	      	<script src="framework/respond.min.js"></script>
	    <![endif]-->
    <script type="text/javascript" src="__ADMIN__layui/layui.js"></script>
    <!-- 滚动条插件 -->
    <link rel="stylesheet" type="text/css" href="__ADMIN__css/jquery.mCustomScrollbar.css">
    <script src="__ADMIN__framework/jquery-ui-1.10.4.min.js"></script>
    <script src="__ADMIN__framework/jquery.mousewheel.min.js"></script>
    <script src="__ADMIN__framework/jquery.mCustomScrollbar.min.js"></script>
    <script src="__ADMIN__framework/cframe.js"></script><!-- 仅供所有子页面使用 -->
    <!-- 公共样式 结束 -->

    <link rel="stylesheet" type="text/css" href="__ADMIN__css/frameStyle.css">
    <script type="text/javascript" src="__ADMIN__framework/frame.js"></script>

</head>

<body>
    <!-- 左侧菜单 - 开始 -->
    <div class="frameMenu">
        <div class="logo">
            <img src="{$UserAdmin.head_pic}" />
            <div class="logoText">
                <h1>{$UserAdmin.name|default="超级管理员"}</h1>
                <p>{$UserAdmin.username}</p>
            </div>
        </div>
        <div class="menu">
            <ul>
                {volist name="menus" id="v"}
                {if $v['level']=="0"}
                {if $v['controller']==""||$v['action']==""}
                <li>
                    <a class="menuFA" href="javascript:void(0)" data-null="">
                        <i class="{$v.ico} left"></i>{$v.name}<i class="iconfont icon-dajiantouyou right"></i>
                    </a>
                    {if $v['is_son']=='1'}
                    {volist name="menus" id="v1"}
                    {if $v['id']==$v1['parent_id']}

                    {if $UserAdmin['id']!=1}
                    {if !in_array($v1['controller'].'/'.$v1['action'],$ability)===false}
                    <dl>
                        <dt><a href="javascript:void(0)"
                                onclick="menuCAClick('{:url($v1.controller.'/'.$v1.action)}',this)"><i
                                    class="{$v1.ico} left"></i>{$v1.name}</a></dt>
                    </dl>
                    {/if}
                    {else/}
                    <dl>
                        <dt><a href="javascript:void(0)"
                                onclick="menuCAClick('{:url($v1.controller.'/'.$v1.action)}',this)"><i
                                    class="{$v1.ico} left"></i>{$v1.name}</a></dt>
                    </dl>
                    {/if}

                    {/if}
                    {/volist}
                    {/if}
                </li>
                {else/}

                {if $UserAdmin['id']!=1}
                {if !in_array($v['controller'].'/'.$v['action'],$ability)===false}
                <li>
                    <a class="menuFA" href="javascript:void(0)"
                        onclick="menuCAClick('{:url($v.controller.'/'.$v.action)}',this)">
                        <i class="{$v.ico} left"></i>{$v.name}
                    </a>
                </li>
                {/if}
                {else/}
                <li>
                    <a class="menuFA" href="javascript:void(0)"
                        onclick="menuCAClick('{:url($v.controller.'/'.$v.action)}',this)">
                        <i class="{$v.ico} left"></i>{$v.name}
                    </a>
                </li>
                {/if}

                {/if}
                {/if}
                {/volist}

            </ul>
        </div>
    </div>
    <!-- 左侧菜单 - 结束 -->

    <div class="main">
        <!-- 头部栏 - 开始 -->
        <div class="frameTop">
            <img class="jt" src="__ADMIN__images/top_jt.png" />
            <div class="topMenu">
                <ul>
                    <li><a href="javascript:void(0)" onclick="menuCAClick('{:url('Login/personal')}',this)"><i
                                class="iconfont icon-yonghu1"></i>管理员</a></li>
                    <li><a href="javascript:void(0)" onclick="menuCAClick('{:url('Login/uppwd')}',this)"><i
                                class="iconfont icon-xiugaimima"></i>修改密码</a></li>
                    <li><a href="javascript:void(0)" class="logout"><i class="iconfont icon-084tuichu"></i>注销</a></li>
                </ul>
            </div>
        </div>
        <!-- 头部栏 - 结束 -->

        <!-- 核心区域 - 开始 -->
        <div class="frameMain">
            <div class="title" id="frameMainTitle">
                <span><i class="iconfont icon-xianshiqi"></i>欢迎首页</span>
            </div>
            <div class="con">
                <iframe id="mainIframe" src="{:url('index/home')}" scrolling="auto"></iframe>
            </div>
        </div>
        <!-- 核心区域 - 结束 -->
    </div>
    <script>
        $('.menu li').each(function () {
            if ($(this).children('dl').length == 0 && $(this).children('a').attr('data-null') == "") {
                $(this).hide();
            }
        });
        $('.logout').click(function () {
            $.ajax({
                url: "{:url('Login/logout')}",
                dataType: 'json',
                success: function (res) {
                    if (res.code == 0) {
                        $(window).attr('location', "{:url('Login/login')}");
                    }
                }
            })
        });
    </script>
</body>

</html>